-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
if vim.g.neovide then
  -- 启用 multigrid
  vim.g.neovide_multigrid = true
  -- 配合 multigrid 使用的浮动窗口设置
  vim.g.neovide_floating_blur_amount_x = 2.0 -- 浮动窗口模糊效果
  vim.g.neovide_floating_blur_amount_y = 2.0
  vim.g.neovide_floating_shadow = true -- 浮动窗口阴影
  vim.g.neovide_floating_z_height = 10 -- 浮动窗口 Z 轴高度

  -- 字体设置
  vim.o.guifont = "JetBrainsMono Nerd Font:h12"

  -- 行间距
  vim.opt.linespace = 7
  vim.g.neovide_line_space = 2.0

  -- 其他常用 Neovide 设置
  vim.g.neovide_opacity = 0.85 -- 透明度
  vim.g.neovide_window_blurred = true -- 背景模糊

  -- 光标动画
  vim.g.neovide_cursor_animation_length = 0.1
  vim.g.neovide_cursor_trail_size = 0.8 -- 光标拖尾
  vim.g.neovide_cursor_blinking = true
  vim.g.neovide_cursor_blink_rate = 100

  -- 光标特效
  vim.g.neovide_cursor_vfx_mode = "pixiedust" -- or "torpedo", "pixiedust"
  vim.g.neovide_cursor_vfx_particle_lifetime = 1.5 --光标粒子寿命（秒）
  vim.g.neovide_cursor_vfx_particle_density = 20 --光标特效粒子数量
  vim.g.neovide_cursor_vfx_particle_speed = 30 --光标特效速度

  -- 刷新率（高刷屏建议设为 144）
  vim.g.neovide_refresh_rate = 144
  vim.keymap.set("n", "<F11>", function()
    vim.g.neovide_fullscreen = not vim.g.neovide_fullscreen
  end, { silent = true })
end
